class CoursesController < ApplicationController
  # GET /courses
  # GET /courses.xml
  def index
    @courses = Course.find(:all, :include => :teacher)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @courses }
    end
  end

  # GET /courses/1
  # GET /courses/1.xml
  def show
    @course = Course.find(params[:id], :include => :teacher)

    respond_to do |format|
      if page_name
        format.html { render :action => page_name }
      else
        format.html
      end
      format.xml  { render :xml => @course }
    end
  end

end
